{template header}

<script language="javascript" type="text/javascript">
	jQuery(function(){
		jQuery('#s1').val(0);
		jQuery('#s1').change(function(){			
			var provinceId = jQuery(this).val();			
			jQuery('#s2').html('<option value="0">==二级==</option>');
			jQuery('#s3').html('<option value="0">==三级==</option>');
			jQuery('#s4').html('<option value="0">==四级==</option>');
			jQuery.getJSON('example.htm?action=area&provinceId='+provinceId+'&'+Math.random(), 
				function(data){				
					if(data.length > 0){
						jQuery.each(data, function(i,item){
							jQuery('#s2').append('<option value="'+item['categoryId']+'">'+item['cateName']+'</option>');
						});
					}
				});
		});
		
		jQuery('#s2').change(function(){
			var areaId = jQuery(this).val();
			jQuery('#s3').html('<option value="0">==三级==</option>');
			jQuery.getJSON('example.htm?action=schools&areaId='+areaId+'&'+Math.random(), 
				function(data){
					if(data.length > 0){
						jQuery.each(data, function(i,item){
							jQuery('#s3').append('<option value="'+item['categoryId']+'">'+item['cateName']+'</option>');
						});
					}
				});
		});
	
		jQuery('#s3').change(function(){
			var networkId = jQuery(this).val();
			jQuery('#s4').html('<option value="0">==四级==</option>');
			jQuery.getJSON('example.htm?action=network&networkId='+networkId+'&'+Math.random(), 
				function(data){
					if(data.length > 0){
						jQuery.each(data, function(i,item){
							jQuery('#s4').append('<option value="'+item['categoryId']+'">'+item['cateName']+'</option>');
						});
					}
				});
		});
	
	})
</script>

<div id="page">
	<table>
		<tr>
			<td><a href="site-register.htm" onclick="ajaxmenu(this.href, 1);">ajaxmenu</a></td>
		</tr>
		<tr>
			<td><a href="###" onclick="ajaxalert('你好');">ajaxalert</a></td>
		</tr>
		<tr>
			<td><a href="site-get.htm" onclick="ajaxget(this.href, 'show', 'show', null, null);">ajaxget</a></td>
		</tr>
		<tr>
			<td><a href="site-get.htm" onclick="ajaxconfirm('您确定删除吗？', this.href);">ajaxconfirm</a></td>
		</tr>
	</table>
	<div id="show"></div>
</div>

<select name="s1" id="s1">
	<option value="0">==一级==</option>
	<!--{loop $provinceArr $list}-->
	<option value="$list[categoryId]">$list[cateName]</option>
	<!--{/loop}-->
</select>

<select name="s2" id="s2">
	<option value="0">==二级==</option>
</select>

<select name="s3" id="s3">
	<option value="0">==三级==</option>
</select>


<select name="s4" id="s4">
	<option value="0">==四级==</option>
</select>

{template footer}